package com.coder.oj.system.dto;

import com.coder.oj.common.validate.ValidationGroups;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class CommitDto implements Serializable {

    @ApiModelProperty("题目id")
    @NotNull(message = "题目id不能为空", groups = {ValidationGroups.Insert.class})
    private Long problemId;

    @ApiModelProperty("语言（1java，2cpp，3php，4python，5golang，6javascript）")
    @NotNull(message = "语言不能为空", groups = {ValidationGroups.Insert.class})
    private Integer language;

    @ApiModelProperty("运行代码")
    @NotBlank(message = "运行代码不能为空", groups = {ValidationGroups.Insert.class})
    private String code;

    @ApiModelProperty("调试用例")
    private String debugCase = "";
}
